<template>
  <div class="p-3">
    <el-card class="mt-3">
      <custom-table
        ref="tableRef"
        :prop-list="tableBase"
        :showIndexColumn="true"
        sequenceWidth="90"
        select-key="id"
        :req-request="reqRequest"
        :props-search-form="searchForm"
        :cellStyle="cellStyle"
        :operate-flag="false"
        :disableI-ids="[]"
        :role-config="[]"
        :expend-visible="false"
      >
        <template #resetNumber="{ row }">
          <div class="text-center">{{ subtract(row.number, row.useNumber) }}</div>
        </template>
        <template #status="{ row }">
          <div class="flex justify-center items-center">
            <div class="w-full flex justify-center items-center">
              <el-tag v-if="row.status === 'STATIC'" type="info">{{ $t('myThail.index.039058-0') }}</el-tag>
              <el-tag v-if="row.status === 'DONE'" type="primary">{{ $t('myThail.index.039058-1') }}</el-tag>
              <el-tag v-if="row.status === 'DEAD'" type="danger">{{ $t('myThail.index.039058-2') }}</el-tag>
            </div>
          </div>
        </template>
      </custom-table>
    </el-card>
  </div>
</template>

<script setup>
import customTable from '@/components/customTable'
import {cellStyle, tableBase} from "./config.js";
import {subtract} from "@/utils/setting.js";

const reqRequest = {
  url: '/pay/userPack/currentPackList',
  method: 'get'
}
const dialogFormRef = ref()
const thaliTemplate = {
  name: "",
  amount: 0,
  number: 0,
  describe: "",
  sort: 1
} // 弹框模板

const searchForm = ref({}) // 搜索条件
const tableRef = ref() // 表格实例对象

</script>

<style scoped lang="scss">

</style>